<template>
    <van-loading  type="spinner"  style="transform: translateY(45vh) !important;" v-if="Loading"
        >加载中...</van-loading>
    <div class="page" v-else>
        <!-- 导航栏 -->
        <!-- <div class="navBar">
            <customNavBar :leftTetx=leftTetx :titleTest=titleTest></customNavBar>
        </div> -->
        <div class="pageHeader" :style="{'marginTop':myHeight}">
            <div class="pageHeaderd"  @click="goBack()">
                <img src="../../assets/jst/f.png" alt="">
            </div>
            <div class="pageHeade">{{title}}</div>
            <div class="pageHeaderd"></div>
        </div>
        <!-- 页面内容 -->
        <div class="content">
            <!-- 页面头部 -->
            <div class="contentTop">
                <!-- 条件输入 -->
                <div class="input">
                    <!-- 搜索框 -->
                    <van-search class="searchView" placeholder="请输入机构名称" v-model="customName" :show-action="showAction" reverse-color
                        @search="onSearch" @cancel="onCancel" @focus="onFocus" />
                        <div class='searchButton' @click="onSearch">搜索</div>
                    <!-- 下拉选择框 -->
                    <van-dropdown-menu class="dropdownMenu">
                        <van-dropdown-item v-model="dateInterval" :options="dropdownMenuList" @change="onSearch" />
                    </van-dropdown-menu>
                </div>
            </div>
            <!-- 列表页 -->
            <div class="listView" v-if="type == 0">
                <div class="wkjs" v-if="jstList.length == 0">
                    <img src="../../assets/jst/wkjs.png" alt="">
                    <div>根据输入的关键字，未查询到相关信息</div>
                </div>
                <div v-else class="listVewSec" v-for="(v, index) in jstList"
                    :key="index">
                    <img class="q" src="../../assets/jst/p.png" alt="">
                    <div class='t'>
                        <div>邀请机构</div>
                        <div>{{v.deptName}}</div>
                    </div>
                    <div class='t' v-if="v.applyManName">
                        <div>邀请人</div>
                        <div>{{v.applyManName}}</div>
                    </div>
                    <div class="secTm">
                        <div class='tfv'>
                            <div>报告保存时间</div>
                            <div>剩余查看时间</div>
                        </div>
                        <div class='tfv'>
                            <div style="color: #222223;">{{v.reportSaveTime}}</div>
                            <div style="color: #222223;">{{v.reportLeftTime}}天</div>
                        </div>
                    </div>
                    <div class="sectButton">
                        <div @click="codePopShow(v)" v-log-button-name="'保单检视_已保存报告_生成分享码'">
                            <img class="v" src="../../assets/jst/ck.png" alt="">
                            生成分享码
                        </div>
                        <div @click="goDetails(v)" v-log-button-name="'保单检视_已保存报告_查看报告'">
                            <img class="v" src="../../assets/jst/yzm.png" alt="">
                            查看报告
                        </div>
                    </div>
                </div>
            </div>
            <!-- 待处理列表 -->
            <div class="listView" v-else-if=" type == 1">
                <div class="wkjs" v-if="jstList.length == 0">
                    <img src="../../assets/jst/wkjs.png" alt="">
                    <div>您还没有相关的报告</div>
                </div>
                <div v-else class="listVewSecDcl" v-for="(v, index) in jstList"
                  :key="index">
                    <img class="q" src="../../assets/jst/p.png" alt="">
                    <div class='t'>
                        <div>邀请机构</div>
                        <div>{{v.deptName}}</div>
                    </div>
                    <div class='t' v-if="v.applyManName">
                        <div>邀请人</div>
                        <div>{{v.applyManName}}</div>
                    </div>
                    <div class="secTm secTmDcl">
                        <div class='tfv'>
                            <div>邀请时间</div>
                            <div>报告有效期</div>
                        </div>
                        <div class='tfv'>
                            <div style="color: #222223;">{{v.createTime}}</div>
                            <div style="color: #222223;">{{v.reportCreateTime}} - {{v.reportEndTime}}</div>
                        </div>
                        <!-- <img class="y" src="../../assets/jst/y.png" alt=""> -->
                    </div>
                    <div class="sectButton">
                        <!-- <div @click="codePopShow(v)" v-log-button-name="'保单检视_已保存报告_生成分享码'">
                            <img class="v" src="../../assets/jst/ck.png" alt="">
                            生成分享码
                        </div> -->
                        <div @click="goDetails(v)" v-log-button-name="'保单检视_待保存报告_查看报告'">
                            <img class="v" src="../../assets/jst/yzm.png" alt="">
                            查看报告
                        </div>
                    </div>
                    <!-- <div class="sectButtonv">
                        待保存报告
                    </div> -->
                </div>
            </div>
            <!-- 历史列表 -->
            <div class="listView" v-else>
                <div class="wkjs" v-if="jstList.length == 0">
                    <img src="../../assets/jst/wkjs.png" alt="">
                    <div>您还没有相关的报告</div>
                </div>
                <div v-else class="listVewSec" v-for="(v, index) in jstList"
                  :key="index">
                    <img class="q" src="../../assets/jst/p.png" alt="">
                    <div class='t'>
                        <div>邀请机构</div>
                        <div>{{v.deptName}}</div>
                    </div>
                    <div class='t' v-if="v.applyManName">
                        <div>邀请人</div>
                        <div>{{v.applyManName}}</div>
                    </div>
                    <div class="secTmh secTmhLsjl">
                        <div class='tfvz'>
                            <div>邀请时间</div>
                            <div>{{v.createTime}}</div>
                        </div>
                        <div class='tfvz'>
                            <div style="color: #868686;">失效原因</div>
                            <div style="color: #198AFA;">{{v.failureCause}}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="twz" v-if="ybcwz">{{ybcwz}}</div>
    </div>
    <pop @send-message="sendMessage" v-if="popShow">
        <template v-slot:header>
            <div>{{ message }}</div>
        </template>
    </pop>
</template>

<script lang="ts" setup name="Task">
import { showDialog } from 'vant'
import { Toast } from '/@/utils/Message';
import { onMounted } from "vue"
import { ref, reactive} from 'vue'
import { dropdownMenuList } from '../Task/ts/task'
import { useRouter, useRoute } from "vue-router"
import { sm2 } from 'sm-crypto';
import customNavBar from "/src/components/NavBar/customNavBar.vue"
import { taskInvitationInfo } from '/@/api/auth/repot'
import { jstTaskList, historicalTask, jstCommonPromptText } from "/@/api/jst/h.ts"
import pop from "/src/components/popFrame/index.vue"
import {
    createAuthorizationCode,
    getConfiguration,
    authorizationCodeList,
    getCustomerInfoByTaskCode,
    cardWhitelist,
    detectAuthUrl,
    detectAuthInfo,
    taskAuthorizationCode
} from "/@/api/auth/repot.ts";
import { log } from 'node:console';


//公钥串---加密使用
const publicKey = ref<string>("044291b381a039a8d7d02d7272d2d7c78a30d33e3eeaa0b509bf77d2376582ab2d573730e6bfe9a53bad53f53ac1a85d9c11050931f04bc8b3afc04144d5a6f9be")
//私钥串---解密使用
const privateKey = ref<string>("5aa03412c3051e1d4cf9d19cfbeeec70c28f388c9f82747cc912096c9cd44bea")
// 加密方法
const JIAMIPublicData=(data:any):string=> {
    const cipherMode = 1;
    const result = sm2.doEncrypt(data, publicKey.value,cipherMode);
    return `04${result}`;
}
// 解密方法
const JIMIPublicData=(data:any):string=> {
    const cipherMode = 1;
    //data为加密的数据
    const result = sm2.doDecrypt(data.substring(2), privateKey.value,cipherMode)
    return result;
}
const hjz=(data:any) => {
    // 语音权限
    var obj = {
    method: 'jstMicrophonePermissions',
    data: {}
    }
    if(navigator.userAgent.indexOf("JinShiTong_iOS") !== -1){
        (window as any).webkit.messageHandlers.interactive.postMessage(obj);
    } else if (navigator.userAgent.indexOf("JinShiTong_Android")!== -1){ 
        //interactive 安卓端定义的类名 postMessage 安卓端定义的方法名
        (window as any).interactive.postMessage(JSON.stringify(obj))
    }
    return
}
const leftTetx = ref<string>("")
const title = ref<string>("")
const router = useRouter()
const route = useRoute()
const showAction = ref<boolean>(false)
const type:any = ref(1);
const message = '此次为您首次生成分享码，需要您进行意愿核身。系统申请使用您的摄像头。'
const ybcwz =  ref('');
const myHeight = ref<any>('')

const dropdownMenuList = ref<dropdownMenuList[]>(
    [
        { text: '全部时间', value: '' },
        { text: '近1周', value: '1' },
        { text: '近1个月', value: '2' },
        { text: '近3个月', value: '3'},
        { text: '近半年', value: '4' },
        { text: '近1年', value: '5' },
        { text: '近2年', value: '6' },
    ]
)


const customName = ref<string>('')
const dateInterval = ref<string>('')
let jstList:any = ref([{},{},{},{},{}])
const Loading = ref<boolean>(false);

const popShow = ref(false)

const goBack = () => {
    router.go(-1)
    // router.push({
    //     path: '/jstWorkTable',
    // })
}

const codePopShow = (v:any) => {
    sessionStorage.setItem('taskCode', v.taskCode)
    sessionStorage.setItem('reportType', v.reportType)
    createAuthorizationCode({
        taskCode: v.taskCode,
        reportType: v.reportType || '1',
    }).then((a: any) => {
        if (a.code == 200) {
            // 不是首次直接到分享码界面
            taskInvitationInfo({taskCode: v.taskCode}).then((z: any) => {
                if (z.code == 200) {
                    router.push({
                        name: 'jstReportingResultShare',
                        query: {
                            taskCode: v.taskCode,
                            reportType: z.data.reportType,
                            userType: z.data.userType,
                            isYsc:1,
                        },
                    })
                }
            });
            // sqm.value = a.authorizationCode
        } else if (a.code == 408) {
            //开启腾讯意愿核身
            popShow.value = true
            return
            // 语音权限
            var obj = {
            method: 'jstMicrophonePermissions',
            data: {}
            }
            if(navigator.userAgent.indexOf("JinShiTong_iOS") !== -1){
                (window as any).webkit.messageHandlers.interactive.postMessage(obj);
            } else if (navigator.userAgent.indexOf("JinShiTong_Android")!== -1){ 
                //interactive 安卓端定义的类名 postMessage 安卓端定义的方法名
                (window as any).interactive.postMessage(JSON.stringify(obj))
            }
            
        } else {
            Toast(a.msg)
        }
    });
};
const sendMessage = (v: any) => {
    popShow.value = false
    if (v != 0) {
        // 查询白名单，只要在白名单中就开启意愿核身
        cardWhitelist({ taskCode: sessionStorage.getItem('taskCode'),isJst: true}).then((a: any) => {
            if (a.data) {
                getDetectAuthUrl()
                //开启腾讯意愿核身 （在白名单中）
            } else {
                // 不在白名单中 不是01也调用意愿核身
                getConfiguration({ name: 'jstCertificationChannel' }).then((v: any) => {
                    if (v.data == '01') {
                        sessionStorage.setItem('ISGongzuo','1')
                        // 开启人脸
                        router.push({
                            name: "userValidation",
                            query: {
                                taskCode: sessionStorage.getItem('taskCode'),
                                reportType: sessionStorage.getItem('reportType'),
                                isYsc: 1,
                                face: 'true',
                                isShare: '01'
                            },
                        });
                    } else {
                        //开启腾讯意愿核身
                        getDetectAuthUrl()
                    }
                })
            }
        })
    }
};
const jstMicrophoneJudgment = ref('') // 语音权限
const jstCameraJudgment = ref('') // 人脸权限
// 语音权限
let jstMicrophone = (q:any) =>{
    console.log('语音权限')
    console.log(q,'q语音权限')
    jstMicrophoneJudgment.value = q.jstMicrophoneJudgment
    if(jstMicrophoneJudgment.value == 'true') {
        // 人脸权限 
        var objz = {
            method: 'jstCameraPermissions',
            data: {}
        }
        if(navigator.userAgent.indexOf("JinShiTong_iOS") !== -1){
            (window as any).webkit.messageHandlers.interactive.postMessage(objz);
        } else if (navigator.userAgent.indexOf("JinShiTong_Android")!== -1){ 
            //interactive 安卓端定义的类名 postMessage 安卓端定义的方法名
            (window as any).interactive.postMessage(JSON.stringify(objz))
        }
    } else {
        // Toast(res.msg) // 暂时不给提示点击否
    }
}
// 人脸权限
let jstCamera = (q:any) =>{
    console.log('人脸权限')
    console.log(q,'q人脸权限')
    jstCameraJudgment.value = q.jstCameraJudgment
    if(jstCameraJudgment.value == 'true') {
        popShow.value = true
    } else {
        // Toast(res.msg) // 暂时不给提示点击否
    }
}
onMounted(async () => {
    Loading.value = true,
    (window as any ).jstMicrophone = jstMicrophone,
    (window as any ).jstCamera = jstCamera
    myHeight.value = sessionStorage.getItem("jstHeaderHeight")?JSON.parse(sessionStorage.getItem("jstHeaderHeight")):''
    // sessionStorage.getItem('jstHeaderHeight')
    if(route.query.type) type.value = route.query.type
    let c = {}
    if(route.query.documentName) {
        c = route.query
    } else {
        c = JSON.parse(sessionStorage.getItem('jstJointLoginVo'))
    }
    console.log(route.query.type)
    if(type.value == 3) {
        title.value = '历史记录'
        let z = await historicalTask(c);
        if(z.code == 200){
            jstList.value = z.historicRecords
        }
    } else {
        let d = await jstTaskList(c);
        if(d.code == 200) {
            if(type.value == 1) {
                title.value = '待保存报告'
                jstList.value = d.jstDoiTaskList
                let b = await jstCommonPromptText(3);
                ybcwz.value = b.data
            } else {
                title.value = '已保存报告'
                jstList.value = d.jstFinTaskList
                let b = await jstCommonPromptText(4);
                ybcwz.value = b.data
            }
        }
    }
        Loading.value = false
});
// 去报告详情
const goDetails = (v: any): void => {
    router.push({
        name: "DetailedVersion",
        query: {
            taskCode: v.taskCode,
            reportType: v.reportType,
            userType: '03',
            isYsc: 1,
            face: 'true',
        }
    })
}
const getDetectAuthUrl = () => {
    detectAuthUrl({ taskCode: sessionStorage.getItem('taskCode'),isJst: '01',}).then((q: any) => {
        if(q.code == 200){
            var q  = q.data.url
            // window.close()
            // router.replace({ path: '/jstYyhs',query: { url: q}})
            // 苹果手机 在微信浏览器 open失效
            window.location.href = q
        }
    })
}
const onSearch = async () => {
    const a = JSON.parse(sessionStorage.getItem('jstJointLoginVo'))
    if( type.value == 3) {
        let z = await historicalTask({'deptName': customName.value, 'dateInterval': dateInterval.value, ...a});
        if(z.code == 200){
            jstList.value = z.historicRecords
        }
    } else {
        let d = await jstTaskList({'deptName': customName.value, 'dateInterval': dateInterval.value, ...a});
        if(d.code == 200) {
            if(type.value == 1) {
                jstList.value = d.jstDoiTaskList
            } else {
                jstList.value = d.jstFinTaskList
            }
        }
    }
};

const onFocus = (val: any) => {
};

const onCancel = (val: any) => {

};
</script>

<!-- less嵌套设置 -->
<style lang="less" scoped>
.page {
    background-color: #3296FA;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    .pageHeader {
        width: 97%;
        display: flex;
        padding-left: 10px;
        align-items: center;
        justify-content: space-between;
        .pageHeaderd {
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
        }
        .pageHeade {
            color:#F5F7FA;
            font-size: 17px;
        }
        .pageHeadez {
            width: 10px;
        }
        img {
            width: 23px;
            height: 23px;
        }
    }
    .twz {
        width: 100%;
        bottom: -1px;
        height: 90px;
        padding: 10px;
        position: fixed;
        font-size: 13px;
        text-align: left;
        overflow-y:scroll;
        background: #F5F7FA;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        box-shadow: 0px 0 12px 0px rgba(0,64,128,0.1);
    }
    .listView {
        width: 100%;
        margin-top: 30px;
        overflow-y: scroll;
        padding-bottom: 170px;
        box-sizing: border-box;
        background-color: #F5F7FA;
        height: calc(100% - 44px - 30px);
        border-radius: 12px 12px 0px 0px;
        .wkjs {
            img {
                width: 200px;
                height: 148px;
                margin: 0 auto;
                margin-top: 70px;
            }
            div {
                color: #222222;
            }
        }
        .listVewSec {
            width: 93%;
            min-height: 197px;
            overflow: hidden;
            margin-top: 17px;
            margin-left: 3.5%;
            position: relative;
            border-radius: 10px;
            background: rgba(255,255,255);
            box-shadow: 0px 1 4px 0px rgba(0,64,128,0.07);
            .q {
                width: 100%;
                height: 80px;
                position: absolute;
            }
            .t {
                display: flex;
                font-size: 17px;
                padding: 0 17px;
                margin-top: 10px;
                position: relative;
                justify-content: space-between;
                div:nth-child(1){
                    color: #868686;
                }
                div:last-child {
                    color: #222223;
                }
            }
            .secTm {
                width: 95%;
                min-height: 70px;
                margin: 0 auto;
                margin-top: 10px;
                overflow: hidden;
                position: relative;
                border-radius: 10px;
                background: #F8F9FA;
                .tfv {
                    display: flex;
                    font-size: 13px;
                    padding: 0 17px;
                    color: #868686;
                    margin-top: 10px;
                    position: relative;
                    div:nth-child(1){
                       width: 53%;
                       text-align: left;
                    }
                }
                .y {
                    top: 30px;
                    right: 10px;
                    width: 19px;
                    height: 19px;
                    position: absolute;
                }
            }
            .secTmh {
                width: 93%;
                // height: 70px;
                margin: 0 auto;
                margin-top: 13px;
                overflow: hidden;
                margin-bottom: 10px;
                border-radius: 10px;
                background: #F8F9FA;
                .tfvz {
                    display: flex;
                    font-size: 13px;
                    padding: 0 17px;
                    margin-top: 10px;
                    div:nth-child(1){
                       width: 43%;
                       color: #868686;
                       text-align: left;
                    }
                }
            }
            .secTmhLsjl {
                padding-bottom: 10px;
            }
            .secTmDcl {
                margin-top: 30px;
            }
            .sectButton {
                display: flex;
                margin-top: 7px;
                margin-bottom: 7px;
                padding-right: 10px;
                justify-content: flex-end;
                div:first-child {
                    // margin-left: 30%;
                }
                div {
                    display: flex;
                    font-size: 13px;
                    color: #F8F9FA;
                    text-indent: 7px;
                    margin-left: 10px;
                    padding: 7px 13px;
                    border-radius: 17px;
                    background: linear-gradient( 0, #44A1FD 0%, #2792FC 48%, #298BF0 100%);
                    .v {
                        width: 17px;
                        height: 17px;
                    }

                }
            }
            .sectButtonv {
                padding: 10px 0;
                font-size: 14px;
                color: #198AFA;
            }
        }
        .listVewSecDcl {
                width: 93%;
                // min-height: 197px;
                overflow: hidden;
                margin-top: 17px;
                margin-left: 3.5%;
                position: relative;
                border-radius: 10px;
                background: rgba(255,255,255);
                box-shadow: 0px 1 4px 0px rgba(0,64,128,0.07);
                .q {
                    width: 100%;
                    height: 80px;
                    position: absolute;
                }
                .t {
                    display: flex;
                    font-size: 17px;
                    padding: 0 17px;
                    margin-top: 10px;
                    position: relative;
                    justify-content: space-between;
                    div:nth-child(1){
                        color: #868686;
                    }
                    div:last-child {
                        color: #222223;
                    }
                }
                .secTm {
                    width: 95%;
                    min-height: 70px;
                    margin: 0 auto;
                    margin-top: 10px;
                    overflow: hidden;
                    position: relative;
                    border-radius: 10px;
                    background: #F8F9FA;
                    .tfv {
                        display: flex;
                        font-size: 12px;
                        padding: 0 17px;
                        color: #868686;
                        margin-top: 10px;
                        position: relative;
                        div:nth-child(1){
                        width: 45%;
                        text-align: left;
                        }
                    }
                    .y {
                        top: 30px;
                        right: 10px;
                        width: 19px;
                        height: 19px;
                        position: absolute;
                    }
                }
                .secTmh {
                    width: 93%;
                    // height: 70px;
                    margin: 0 auto;
                    margin-top: 13px;
                    overflow: hidden;
                    margin-bottom: 10px;
                    border-radius: 10px;
                    background: #F8F9FA;
                    .tfvz {
                        display: flex;
                        font-size: 13px;
                        padding: 0 17px;
                        margin-top: 10px;
                        div:nth-child(1){
                            width: 53%;
                            color: #868686;
                            text-align: left;
                        }
                    }
                }
                .secTmDcl {
                    margin-top: 17px;
                    padding-bottom: 10px;
                }
                .sectButton {
                    display: flex;
                    margin-top: 7px;
                    margin-bottom: 7px;
                    padding-right: 10px;
                    justify-content: flex-end;
                    div:first-child {
                        // margin-left: 30%;
                    }
                    div {
                        display: flex;
                        font-size: 13px;
                        color: #F8F9FA;
                        text-indent: 7px;
                        margin-left: 10px;
                        padding: 7px 13px;
                        border-radius: 17px;
                        background: linear-gradient( 0, #44A1FD 0%, #2792FC 48%, #298BF0 100%);
                        .v {
                            width: 17px;
                            height: 17px;
                        }

                    }
                }
                .sectButtonv {
                    padding: 10px 0;
                    font-size: 14px;
                    color: #198AFA;
                }
        }
    }
    :deep(.van-tab--active) {
        color: #0a3cf6 !important;;
    }
    .navBar {
    //   z-index: 1000;
    //   top: 30px;
    //   position: fixed;
        :deep(.van-nav-bar__title) {
            color: white;
        }
        :deep(.van-icon) {
            color: white;
        }
    }
    .content {
        height: 100%;
        width: 100%;
        // margin-top: 10px;
        // padding-top: 68px;
        overflow: hidden;
        box-sizing: border-box;
        .contentTop {
            width: 100%;
            // top: 78px;
            // position: fixed;
            // z-index: 100;
            background-color: #3296FA;

            .input {
                display: flex;
                align-items: center;
                width: 100%;
                padding: 10px;
                padding-bottom: 0px;
                box-sizing: border-box;
                .searchButton {
                    font-size: 15px;
                    color: #F5F7FA;
                    padding:0 10px;
                }
                .searchView {
                    width: 53%;
                    border-radius: 5px;
                    border: 0.5px solid rgba(255, 255, 255, 0.5);
                    height: 30px;
                    background-color: #2B8AE9;
                    color: white;
                    
                    :deep(.van-search) {
                        padding: 0px;
                        color: white;
                    }

                    :deep(.van-search__content) {
                        // top: -7px;
                        // height: 23px;
                        color: white;
                        padding-left: 0;
                        position: relative;
                        background-color: transparent;
                    }

                    :deep(.van-cell) {
                        height: 100%!important;
                        background: transparent!important;
                    }

                    :deep(.van-field__control){
                        color:white
                    }

                    :deep(.van-icon-search:before) {
                        color: white;
                    }
                    :deep(#van-search-1-input) {
                        font-size: 14px;
                    }
                }

                .dropdownMenu {
                    width: 30%;
                    height: 30px;
                    padding-left: 10px;
                    border-radius: 10px;
                    
                    :deep(.van-dropdown-menu){
                        position: relative;
                    }
                    :deep(.van-dropdown-menu__bar){
                        z-index: 1;
                        position: relative;
                    }
                    
                    :deep(.van-ellipsis) {
                        color: white;
                    }

                    :deep(.van-dropdown-menu__bar) {
                        background-color: #2B8AE9;
                        height: 30px;
                        border-radius: 5px;
                        border: 0.5px solid rgba(255, 255, 255, 0.5);
                    }
                }

            }


            .tabs {
                width: 100%;

                :deep(.van-tab) {
                    background-color: #3296FA;
                    color: white;
                }

                :deep(.van-tab--active) {
                    color: white;
                }
            }
        }
    }
}

</style>


<!-- 

    1、任务统计页面展示的是该从业人员发起的所有有效保单检视任务数据。包括通过h5页面发起和接口发起两个形式创建的检视任务。按已完成、进行中、失败三个维度展示任务数据。已完成的任务不展示任务流程节点，进行中和失败的任务展示任务流程节点。
    2、任务流程节点即任务状态，进行中的任务状态包括已创建、已查看告知页、已授权认证、已确认保单范围、生成报告中状态的任务。
    失败维度包括：未查看告知页、未授权/身份认证、未选择保单范围、无有效保单、报告生成失败状态的任务。失败维度中的未查看告知页、未授权/身份认证、未选择保单范围三种状态是指，在邀请二维码/链接超过7天有效期后，任务还停留在以上三种状态，则计为任务失败。终止状态是指在后台进行终止操作的任务状态 。
    3、任务统计列表按邀请时间倒序排列。每页展示20个任务，通过上滑加载的方式加载20个数据。
    4、搜索：根据客户姓名搜索任务，精确查询，点击“搜索”后，展示查询到的任务，如未查询到任务，页面提示：根据输入的关键字，未查询到任务信息。
    5、任务邀请时间即任务链接生成时间。
    6、按邀请时间下拉选项查询时，查询结果列表按邀请时间倒序排列。
    任务编号生成规则：保单登记机构编码6位+长日期（yymmddHHMMSS年月日时分秒12）+4位流水号.
 -->
